package com.zjx.springcloud.utils;


import com.zjx.springcloud.constant.HttpCode;
import com.zjx.springcloud.entities.ResultVO;
@SuppressWarnings("all")
public class ResultVOUtil {
    public static String msgDefault="";

    public static ResultVO success(String message, Object object) {
        return new ResultVO(HttpCode.REQUEST_SUCCESS_CODE,message,object);
    }

    public static ResultVO success(Object object) {
        return new ResultVO(HttpCode.REQUEST_SUCCESS_CODE,msgDefault,null);
    }

    public static ResultVO error( String msg) {
        ResultVO resultVO = new ResultVO();
        resultVO.setCode(HttpCode.REQUEST_ERROR_CODE);
        resultVO.setMessage(msg);
        return resultVO;
    }
}
